<template>
  <div class="big-box">
    <Top></Top>
    <Banner id="1"></Banner>
    <chamber></chamber>
    <div class="boa war">
      <!-- 版心区域 -->
      <div class="area-center">
        <!-- 消息总区域 -->
        <div class="top">
          <!-- 消息区域 -->
          <head-page title="消 息"> </head-page>
          <!-- 消息文字区域 -->
          <div class="umit title-center m-t-10">
            <div
              class="xiao m-t-07"
              v-for="(item, index) in list"
              :key="index"
              @click="legal(item)"
            >
              <div class="left">
                <div class="yuan"></div>
              </div>
              <div class="zhong">
                {{ item.messageTitle }}
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <Tabbar></Tabbar>
  </div>
</template>

<script>
import Top from "../../components/Home/TopPage.vue";
import Banner from "@/components/Home/BannerView.vue";
import chamber from "@/components/Home/CommCe.vue";
import Head from "@/components/public/HeadPage.vue";
import Tabbar from "@/components/public/TabbleView.vue";
import { getMessageList } from "@/api/index";
export default {
  data() {
    return {
      list: [],
    };
  },
  components: {
    Top,
    Banner,
    chamber,
    Head,
    Tabbar,
  },
  mounted() {
    getMessageList().then((res) => {
      if (res.data.code == 200) {
        this.list = res.data.data;
      }
    });
  },
  methods: {
    legal(i) {
      this.$router.push({
        path: "/legalaffairs",
        query: { id: i.messageId, title: i.messageTitle },
      });
    },
  },
  //底部栏的高亮
  created() {
    sessionStorage.setItem("active", 3);
  },
};
</script>

<style scoped>
.big-box {
  width: 100%;
  /* height: 100%; */
}
.boa {
  margin-top: 0.05rem;
}
/* 版心区域 */
.center {
  width: 98%;
  height: 3rem;
  /* background-color: rebeccapurple; */
}

/* 图标区域 */

/*消息区域 */
.umit {
  width: 100%;
  min-height: 0.4rem;

}
.xiao {
  width: 100%;
  display: flex;
}
/* 左边区域 */

.left {
  width: 5%;
  margin-right: 0.07rem;
}
.yuan {
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 50%;
  background-color: black;
  margin-top: 0.05rem;
}
/* 中间区域 */
.zhong {
  width: 95%;
  height: 100%;
}
/* 底部区域 */
.bottom {
  width: 100%;
  height: 100%;
  margin-top: 0.1rem;
}

.bottom h3 {
  width: 100%;
  height: 0.35rem;
  text-align: center;
}
/* 内容区域 */
.context {
  width: 100%;
  height: 1rem;
}
</style>